package com.cmy.b_claculator.ui.main

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.cmy.b_claculator.R
import com.cmy.b_claculator.db.entity.WorkDataEntity
import com.example.baselibrary.app.ext.setAdapterAnimation
import com.example.baselibrary.app.util.SettingUtil

class MainAdapter (data: MutableList<WorkDataEntity>) : BaseQuickAdapter<WorkDataEntity, BaseViewHolder>(R.layout.item_mian, data)  {


    init {
        setAdapterAnimation(SettingUtil.getListMode())
    }

    override fun convert(holder: BaseViewHolder, item: WorkDataEntity) {

        holder.setText(R.id.item_todo_title,"总金额：￥${item.money}")
        holder.setText(R.id.item_todo_content, "当前状态："+item.type)
        holder.setText(R.id.item_todo_date, item.time)
    }


}